package com.ksvip.next.components.core.exception;

/**
 * 受检异常，需要开发者手动处理
 */
public class BusinessException extends Exception {
    /**
     *
     */
    private static final long serialVersionUID = 9156868885319477760L;

    private String            errorCode;
    private String            errorMessage;

    /**
     * @return
     */
    public String getErrorCode() {
        return this.errorCode;
    }

    /**
     * @param errorCode
     */
    public void setErrorCode(final String errorCode) {
        this.errorCode = errorCode;
    }

    /**
     * @return
     */
    public String getErrorMessage() {
        return this.errorMessage;
    }

    /**
     * @param errorMessage
     */
    public void setErrorMessage(final String errorMessage) {
        this.errorMessage = errorMessage;
    }

    /**
     * @param cause
     */
    public BusinessException() {
        super();
    }

    /**
     * @param cause
     */
    public BusinessException(final Throwable cause) {
        super(cause);
    }
    /**
     * @param message
     */
    public BusinessException(final String errorCode, final String message) {
        super(message);
        this.errorCode = errorCode;
        this.errorMessage = message;
    }

    /**
     * @param message
     * @param cause
     */
    public BusinessException(final String errorCode, final String message, final Throwable cause) {
        super(message, cause);
        this.errorCode = errorCode;
        this.errorMessage = message;
    }

    public BusinessException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
